	
	<div id="page-content">
			<div class="col-lg-12">
		        <div class="panel">
		            <div class="panel-heading">
		                <h3 class="panel-title" style="text-align: right;">
		                	#@installPJaxGoBackBtn()
		                	添加
		                </h3>
		            </div>
		            <form id="editForm" class="panel-body form-horizontal form-padding">
						<input type="hidden"  name="sysAttachment.id" class="form-control" value="#(o?o.id:'')">
			                <div class="form-group">
			                    <label class="col-md-2 control-label">主键</label>
			                    <div class="col-md-9">
			                        <input type="text"  name="sysAttachment.id" class="form-control"  value="#(o?o.id:'')" #if(view=='detail') readonly #end>
			                        <small class="help-block">请输入主键</small>
			                    </div>
			                </div>
			                <div class="form-group">
			                    <label class="col-md-2 control-label">创建人id</label>
			                    <div class="col-md-9">
			                        <input type="text"  name="sysAttachment.create_user_id" class="form-control"  value="#(o?o.create_user_id:'')" #if(view=='detail') readonly #end>
			                        <small class="help-block">请输入创建人id</small>
			                    </div>
			                </div>
			                <div class="form-group">
			                    <label class="col-md-2 control-label">创建人名称</label>
			                    <div class="col-md-9">
			                        <input type="text"  name="sysAttachment.create_user_name" class="form-control"  value="#(o?o.create_user_name:'')" #if(view=='detail') readonly #end>
			                        <small class="help-block">请输入创建人名称</small>
			                    </div>
			                </div>
			                <div class="form-group">
			                    <label class="col-md-2 control-label">机构id</label>
			                    <div class="col-md-9">
			                        <input type="text"  name="sysAttachment.create_org_id" class="form-control"  value="#(o?o.create_org_id:'')" #if(view=='detail') readonly #end>
			                        <small class="help-block">请输入机构id</small>
			                    </div>
			                </div>
			                <div class="form-group">
			                    <label class="col-md-2 control-label">机构名称</label>
			                    <div class="col-md-9">
			                        <input type="text"  name="sysAttachment.create_org_name" class="form-control"  value="#(o?o.create_org_name:'')" #if(view=='detail') readonly #end>
			                        <small class="help-block">请输入机构名称</small>
			                    </div>
			                </div>
			                <div class="form-group">
			                    <label class="col-md-2 control-label">创建时间</label>
			                    <div class="col-md-9">
			                        <input type="text"  name="sysAttachment.create_time" class="form-control"  value="#(o?o.create_time:'')" #if(view=='detail') readonly #end>
			                        <small class="help-block">请输入创建时间</small>
			                    </div>
			                </div>
			                <div class="form-group">
			                    <label class="col-md-2 control-label">相对路径</label>
			                    <div class="col-md-9">
			                        <input type="text"  name="sysAttachment.url" class="form-control"  value="#(o?o.url:'')" #if(view=='detail') readonly #end>
			                        <small class="help-block">请输入相对路径</small>
			                    </div>
			                </div>
			                <div class="form-group">
			                    <label class="col-md-2 control-label">绝对路径</label>
			                    <div class="col-md-9">
			                        <input type="text"  name="sysAttachment.real_url" class="form-control"  value="#(o?o.real_url:'')" #if(view=='detail') readonly #end>
			                        <small class="help-block">请输入绝对路径</small>
			                    </div>
			                </div>
			                <div class="form-group">
			                    <label class="col-md-2 control-label">文件名</label>
			                    <div class="col-md-9">
			                        <input type="text"  name="sysAttachment.file_name" class="form-control"  value="#(o?o.file_name:'')" #if(view=='detail') readonly #end>
			                        <small class="help-block">请输入文件名</small>
			                    </div>
			                </div>
			                <div class="form-group">
			                    <label class="col-md-2 control-label">后缀名</label>
			                    <div class="col-md-9">
			                        <input type="text"  name="sysAttachment.suffix" class="form-control"  value="#(o?o.suffix:'')" #if(view=='detail') readonly #end>
			                        <small class="help-block">请输入后缀名</small>
			                    </div>
			                </div>
			            	<div class="panel-footer">
			                    <div class="row">
			                        <div class="col-sm-8 col-sm-offset-3">
			                            <button class="btn btn-warning" type="reset" #if(view=='detail') disabled #end>重置</button>
			                            <button class="btn btn-primary" type="submit" #if(view=='detail') disabled #end>保存</button>
			                        </div>
			                    </div>
			                </div>
		            </form>
		        </div>
		    </div>
	</div>
	<script>
		function save(){
			var data = common_ajax.ajaxFunc("/admin/sysattachment/save", $('#editForm').serialize(), "json", null);
			if(data.success){
				pointLion.alertMsg("保存成功!" , "success" , "small" , function(){
					location.href = ctx+'/admin/sysattachment/getApplyListPage';//跳转到列表页
				});
			}else{
				pointLion.alertMsg(data.message , "success" , "small" , function(){
					$(".btn").removeAttr("disabled");
				});
			}
		}
		$(document).ready(function() {
			$('#editForm').bootstrapValidator({
	            fields: {
	            }
	        }).on("success.form.bv", function (e) {
	            save();
	            return false;//阻止表单跳转
	        });
		});
	</script>